<?php

//加载个人中心配置文件
include_once($_SERVER['DOCUMENT_ROOT'] ."/include/user/inc.php");

error_reporting(E_ALL);


//所有的参数
$g_cgival 	= array();
//存储中间数据 非输出数据 可以不用
$g_pro	 	= array();
//要显示的数据 输出数据
$g_show 	= array();

function check_cgi_pro()
{		
	global $g_cgival, $g_pro, $g_show, $config;
	
	cgi::both($g_cgival["url"], "url", "");
	
	//去JS和HTML标签
	$g_cgival['url'] 	= string::un_script_code($g_cgival['url']);
	$g_cgival['url'] 	= string::un_html($g_cgival['url']);
	
}


function get_data()
{
	global $g_cgival, $g_pro, $g_show, $config;
	
	$user_info = new user_info();
	if($user_info->is_logined())
	{
		header("Location: /user/index.php");
		exit;
	}
	
}


check_cgi_pro();
get_data();
show_pro();

exit;

function show_pro()
{
	global $g_cgival, $g_pro, $g_show, $config;

	
	$smarty = p_get_smarty();	
	$smarty->assign("g_show", $g_show);
	if (isset($_GET["debug"]))
	{
		print_r($g_show);
	}
	$smarty->display("user/login.html");
	unset($g_cgival);
	unset($g_pro);
	unset($g_show);
	unset($config);
}
?>
